<h2>Акции</h2>
<?php foreach($deals as $i => $deal) {?>
	<div class="main_deal">
		<?php if($img = $deal->getMainImg()) : ?>
			<a href="<?php echo Yii::app()->createUrl('deal/'. $deal->id)?>">
				<img alt="<?php echo $deal->title?>" src="/uploads/images/thumbnail_320_240_n/<?php echo $img['name'] ?>" />
			</a>
		<?php endif;?>
		<div class='main_deal_data'>	
			<?php echo CHtml::link($deal->title, Yii::app()->createUrl('deal/'. $deal->id), array('class'=>'main_deal_title')); ?>
			<?php echo $deal->short_description ?>
			<div class="main_deal_discount">
				Скидка: <?php echo $deal->discount?>%
			</div>
			<b>Цена:</b> <?php echo $deal->price ? $deal->price : 'N/A'?><br />
			<small><?php echo CHtml::link('подробнее &raquo;&raquo;', Yii::app()->createUrl('deal/'. $deal->id), array('class'=>'')); ?></small>
		</div>
		<div class="clear"></div>
	</div>
<?php } ?>
